package org.erepublik.company.searchCriteria;

import java.util.Comparator;

import org.erepublik.company.CountryData;
import org.erepublik.company.comparators.CountryDataComparatorByCurrencyPrice;
import org.erepublik.company.comparators.CountryDataComparatorByGoldPrice;
import org.erepublik.company.comparators.CountryDataComparatorByName;
import org.erepublik.company.comparators.CountryDataComparatorByPopulation;
import org.erepublik.company.comparators.CountryDataComparatorBySpread;

public enum ECurrencySortCriteria {
    COUNTRY(new CountryDataComparatorByName(), "Country name"),
    GOLD_PRICE(new CountryDataComparatorByGoldPrice(), "Gold price"),
    CURRENCY_PRICE(new CountryDataComparatorByCurrencyPrice(), "Currency price"),
    SPREAD(new CountryDataComparatorBySpread(), "Spread"),
    POPULATION(new CountryDataComparatorByPopulation(), "Population");
    
    ECurrencySortCriteria( Comparator<? super CountryData> comparator, String name) {
        this.name = name;
        this.comparator = comparator;
    }
    
    private Comparator<? super CountryData> comparator;
    private String name;
    public Comparator<? super CountryData> getComparator() {
        return comparator;
    }
    public String getName() {
        return name;
    }
}
